<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>按钮边框旋转</title>
    <style>
        body {
            background: #000;
        }

        .container {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        @keyframes rotation {
            to {
                transform: rotate(360deg);
            }
        }

        .btn {
            padding: 10px 20px;
            /*border: 2px solid #ff2f0e;*/
            border: none;
            position: relative;
            background: none;
            border-radius: 10px;
            width: 200px;
            height: 80px;
            overflow: hidden;
            color: #fff;
        }

        .btn::before {
            content: '';
            position: absolute;
            width: 200%;
            height: 200%;
            background: #36d3a9;
            left: 50%;
            top: 50%;
            z-index: -2;
            animation: rotation 4s linear infinite;
            /*旋转源点  左上角*/
            transform-origin: left top;
        }

        .btn::after {
            content: '';
            position: absolute;
            inset: 2px;
            background: #000;
            border-radius: inherit;
            z-index: -1;
        }
    </style>
</head>
<body>
<div class="container">
    <button class="btn">边框按钮</button>
</div>
</body>
</html>